#ifndef _TYPES_H_
#define _TYPES_H_

typedef unsigned char       UINT8;
typedef unsigned short      UINT16;
typedef unsigned int        UINT32;
typedef struct {
	UINT32 l;
	UINT32 h;
} UINT64;

#define OUT_OF_SPEC             "<OUT OF SPEC>"

#define WORD(x) (UINT16)(*(const UINT16 *)(x))
#define DWORD(x) (UINT32)(*(const UINT32 *)(x))
#define QWORD(x) (*(const UINT64 *)(x))

#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))

enum cpuidType
{
	cpuid_none,
	cpuid_80386,
	cpuid_80486,
	cpuid_arm_legacy,
	cpuid_arm_soc_id,
	cpuid_x86_intel,
	cpuid_x86_amd,
	cpuid_loongarch,
};

#endif